#include <iostream>
#include <string>
using namespace std;
int simple(int n){
    int d = 0
    for (int i=1; i<=m;i++)
        if (n % i == 0) d++;
    if (d == 2) return true;
    return 0;
}

int main(){

    string text;
    getline(cin, text);
//
    int pr=0;
    for (int i=0; i < text.size(); i++)
        if (text[i] == ' ')
            pr++;

    string slova[pr+1];
    string word;


    int k = 0;
    for (int i=0; i < text.size(); i++){
        if (text[i] == ' '){
            slova[k] = word;
            word = "";
            k++;
        }
        else word += text[i];
    }
      slova[k]= word ;

        int s = 0, d = 0, e = 0;
    if (slova[0] == "one") s = 1;
    if (slova[0] == "two") s = 2;
    if (slova[0] == "three") s = 3;
    if (slova[0] == "four") s = 4;
    if (slova[0] == "five") s = 5;
    if (slova[0] == "six") s = 6;
    if (slova[0] == "seven") s = 7;
    if (slova[0] == "eight") s = 8;
    if (slova[0] == "nine") s = 9;
    if (slova[0] == "zero") s = 0;




    if (slova[1] == "one") d = 1;
    if (slova[1] == "two") d = 2;
    if (slova[1] == "three") d = 3;
    if (slova[1] == "four") d = 4;
    if (slova[1] == "five") d = 5;
    if (slova[1] == "six") d = 6;
    if (slova[1] == "seven") d = 7;
    if (slova[1] == "eight") d = 8;
    if (slova[1] == "nine") d = 9;
    if (slova[1] == "zero") d = 0;



    if (slova[2] == "one") e = 1;
    if (slova[2] == "two") e = 2;
    if (slova[2] == "three") e = 3;
    if (slova[2] == "four") e = 4;
    if (slova[2] == "five") e = 5;
    if (slova[2] == "six") e = 6;
    if (slova[2] == "seven") e = 7;
    if (slova[2] == "eight") e = 8;
    if (slova[2] == "nine") e = 9;
    if (slova[2] == "zero") e = 0;
    int n = s * 100 + d * 10;

    cout << simple(n);
}
